import Vue from "vue";
import itqms from "./itqms";
import router from "./router";
import Antd from "ant-design-vue";
import store from "./store";
import request from "utils/request";
import db from "utils/localstorage";

import { message } from "ant-design-vue";
// import { MdButton, MdField } from "vue-material/dist/components";
// import "vue-material/dist/vue-material.min.css";
// import "vue-material/dist/theme/default.css";

import "ant-design-vue/dist/antd.css";
// import "../static/less/font.css";

import "utils/install";
import IconFont from "~/icons/icon.js";
import "utils/main-design.less";

import { http } from "utils/request";

Vue.config.productionTip = false;
// Vue.use(MdField);
// Vue.use(MdButton);
Vue.use(Antd);
Vue.use(db);

/* Vue.use({
  install(Vue) {
  }
}); */

Vue.component("IconFont", IconFont);

Vue.prototype.$db = db;
Vue.prototype.$http = http;
Vue.prototype.$post = request.post;
Vue.prototype.$get = request.get;
Vue.prototype.$put = request.put;
Vue.prototype.$delete = request.delete;
Vue.prototype.$export = request.export;
Vue.prototype.$download = request.download;
Vue.prototype.$upload = request.upload;

message.config({
  top: (window.screen.height * 0.25).toString() + "px",
  duration: 2,
  maxCount: 3
});
/* eslint-disable no-new */
new Vue({
  router,
  store,
  render: h => h(itqms)
}).$mount("#itqms");
